<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
use think\Route;
$afterBehavior = [
    '\app\common\behavior\ApiAuth',
];
Route::group('jok', function () use ($afterBehavior) {//公共路由
    Route::group('Index', [
        'index'          => ['jok/Index/index',['method' => 'get']],
        'getAuth'        => ['jok/Index/getAuth',['method' => 'get','after_behavior'=>$afterBehavior]],
        'getSelect'      => ['jok/Index/getSelect',['method' => 'get','after_behavior'=>$afterBehavior]],
    ]);
    Route::group('Login', [//登陆
        'login'          => ['jok/Login/login',['method' => 'post']],
    ]);
    Route::group('Admin', [//管理员，角色
        'index'          => ['jok/Admin/index',['method' => 'get']],
        'addEdit'        => ['jok/Admin/addEdit',['method' => 'post']],
        'getDetail'      => ['jok/Admin/getDetail',['method' => 'get']],
        'setStatus'      => ['jok/Admin/setStatus',['method' => 'post']],
        'roleIndex'      => ['jok/Admin/roleIndex',['method' => 'get']],
        'roleAddEdit'    => ['jok/Admin/roleAddEdit',['method' => 'post']],
        'roleGetDetail'  => ['jok/Admin/roleGetDetail',['method' => 'get']],
    ], ['after_behavior' => $afterBehavior]);
    Route::group('Auth', [//权限
        'index'          => ['jok/Auth/index',['method' => 'get']],
        'addEdit'        => ['jok/Auth/addEdit',['method' => 'post']],
        'getDetail'      => ['jok/Auth/getDetail',['method' => 'get']],
    ], ['after_behavior' => $afterBehavior]);
});
Route::miss('index/notRoute');

